package com.indexingsystem.boss.admin.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;

import com.indexingsystem.boss.Vo.StatusList;
import com.indexingsystem.boss.entity.DhTodayStorageInfos;

/**
 * 单日入库明细dao接口.
 * 
 * @author Administrator
 * 
 */
public interface IdhTodayStorageInfosMapper {
	/**
	 * 批量修改入库明细状态.
	 * @param list
	 * @return
	 */
	int updateTodayStorageInfosByResIdList(List<StatusList> list);
	
	
	/**
	 * 批量删除入库明细.
	 * @param list
	 * @return
	 */
	int deleteResourcesByIdBatch(@Param("list") List<String> list);
	
	
	   /**
     * 通过主键id删除当日入库明细.
     * @param storageId
     * @return
     */
    int deleteTodayStorageInfoById(@Param("storageId") String storageId);
    
	
	/**
     * 添加流水表
     * @param dhTodayStorageInfos
     * @return
     */
    int insert(DhTodayStorageInfos dhTodayStorageInfos);
    
    Integer countBatch();
    
    /**
     * 根据userId获取入库记录，校验入库是否已存在，如果存在不允许删除。
     * @param userId
     * @return
     */
    int getTodayStorageInfosByUserId(String userId);
    
    /**
     * 通过入库资源id获取入库记录.
     * @param resId
     * @return
     */
    List<DhTodayStorageInfos> getDhTodayStorageInfosByResId(@Param("resId") String resId);


	List<DhTodayStorageInfos> getDhTodayStorageInfosByResIdAndForMat(String resId);
}